package com.sun.controller;

import com.sun.beans.OptionSelectBean;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * create by Sun
 * 2018/8/8
 */
@Controller
public class OptionSelect {
    @RequestMapping("/getOption")
    @ResponseBody
    public Map<String,Object> getOption(){

        Map<String,Object> map=new HashMap<>();

        List<OptionSelectBean> list=new ArrayList<>();

        list.add(new OptionSelectBean(1,"第一个"));
        list.add(new OptionSelectBean(2,"第二个"));
        list.add(new OptionSelectBean(3,"第三个"));
        map.put("result",list);
        return map;
    }
}
